#ifndef TETRIS_GAME_H_
#define TETRIS_GAME_H_
#include <string>
#include "table_state.h"
namespace Tetris{
struct GameData{
	int Score;
	bool Pause;
	bool GameOver;
	char player[20];
	unsigned char DataTable[20][10];
	bool Shape[4][4];
};

class Game{
private:
	int score;
	bool pause;
	bool gameOver;
	std::string player;
	Table* p_table;
	Table_State* p_state;
	Shape* currentShape;
	Shape* nextShape;
public:
	Game();
	~Game();
	bool GameOver() const;
	void SetPlayer(std::string player);
	std::string GetPlayer() const;
	int GetScore() const;
	const Shape* NextShape() const;
	void MoveLeft();
	void MoveRight();
	void MoveDown();
	void MoveBottom();
	void Transform();
	void TogglePause();
	bool IsPause() const;
	const Table_State* GetCurrentState() const;
	void Resume();
private:
	void destroy();
	void initial();
	void generateState();
	Shape* randomCreateShape();
};

}
#endif
